import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class DispServ extends HttpServlet {
    protected void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
        //res.setContentType("text/html;charset=UTF-8");
        PrintWriter out = res.getWriter();
            String uname=req.getParameter("uname");
            String pwd=req.getParameter("pwd");
            RequestDispatcher rd=req.getRequestDispatcher("Header.html");
            rd.include(req,res);
            out.println("<br><br><br>");
            if(uname.equals("text")&& pwd.equals("soma")){
                out.println("<font color=#FFFF66><h1> User Nmae & Password is correct</h1>");
            }
            else{
                out.println("<font color=#FFFF66><h1> Login Denied</h1>");
            }
            out.println("<br><br><br></font>");
            rd=req.getRequestDispatcher("Footer.html");
            rd.include(req, res);
    }
    protected void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{
        doPost(req,res);
    }
}